package com.zoweunion.mechanic.dao.app;

import com.zoweunion.mechanic.entity.FaultCodeBean;
import com.zoweunion.mechanic.util.GpsTemp;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.*;

@Component
public interface ToolCarDataMapper {

    Map<String,Object> getCode(@Param("cityName")String cityName);

    ArrayList<Map<String, Object>> getKTBL();

    ArrayList<Map<String, Object>> getAllRealData();

    ArrayList<Map<String, Object>>getCATOnlineThingsId(@Param("s_id")String s_id);

    void updateReal(Map<String, Object> reqMap);

    Map<String,Object> selectRedisRealDataByThingsId(@Param("things_id")String things_id);

    String selectSidByThingsId(@Param("thingsId")String things_id);

    List<Map<String, Object>> listOwnerCar(Map<String, Object> reqMap);

    List<Map<String, Object>> listCar(Map<String, Object> reqMap);

    List<Map<String, Object>> bankinglistCar(Map<String, Object> reqMap);

    List<Map<String, Object>> listOwnerCarNew(Map<String, Object> reqMap);

    List<Map<String, Object>> listOwnerForCarNew(Map<String, Object> reqMap);

    List<Map<String, Object>> listCarNew(Map<String, Object> reqMap);

    List<Map<String, Object>> listForCarNew(Map<String, Object> reqMap);

    List<Map<String, Object>> listForCarDateNewForThird(Map<String, Object> reqMap);

    Map<String, Object> selectCarDate(@Param("thingsId")String things_id);

    Map<String, Object> selectRealDateGPS(@Param("thingsId")String things_id);

    void updateByStatus(Map<String, Object> reqMap);

    void updateByFaultStatus(Map<String, Object> reqMap);

    Map<String,Object> selectByThingsId(@Param("thingsId")String things_id);

    Map<String,Object> carCountFuelWork(@Param("item")String item,@Param("thingsId") String thingsId);

    Map<String,Object> carCountFuelWorkA(@Param("startTime")Date startTime,
                                         @Param("endTime")Date endTime,
                                         @Param("thingsId")String thingsId);

    List<Map<String, Object>> selectTirePressureData(@Param("thingsId")String things_id);

    LinkedHashMap<String,Object> selectDataList(@Param("keyList")String keyList,
                                                @Param("thingsId")String thingsId,
                                                @Param("tb1")String tb1,
                                                @Param("tb2") String tb2);

    Map<String,Object> getCarData(@Param("thingsId") String thingsId);

    Map<String,Object> carDataMapOperatingHour(@Param("thingsId") String thingsId,
                                               @Param("tb1") String tb1,
                                               @Param("tb2") String tb2);

    void insertLocationTemp(@Param("recordMap")Map<String, Object> recordMap);

    void insertTrid(@Param("thingsId")String thingsId,@Param("tid") int tid,
                    @Param("trid") int trid,@Param("id") String id);

    Map<String, Object> selectTrid(@Param("thingsId")String thingsId);

    List<GpsTemp> selectLocationTemp(@Param("thingsId")String thingsId,@Param("limit")Integer limit);

    void deleteGpsTemp(@Param("ids")String ids);


    List<Map<String, Object>> selectBySidModelId(@Param("thingsId")String thingsId);

    List<Map<String, Object>> selectByModelId(@Param("thingsId")String thingsId);

    List<Map<String, Object>> selectByDefault();


    /**
     * 获取游客的可见的车
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listGuestCar(Map<String, Object> reqMap);

    int countListCar(Map<String, Object> reqMap);

    int countBankingListCar(Map<String, Object> reqMap);

    Map<String, Object> getPcCar(@Param("thingsId") String thingsId);

    Map<String, Object> getCarInfo(@Param("thingsId") String thingsId);

    Map<String, Object> getPcCarNew(@Param("thingsId") String thingsId, @Param("c_id") String c_id);

    Map<String, Object> lastCarDataToday(@Param("tableName") String tableName, @Param("thingsId") String thingsId);
    Map<String, Object> lastCarDataBeforeDate(@Param("tableName") String tableName, @Param("thingsId") String thingsId,
                                              @Param("date") LocalDate date);

    Map<String,Object>getRealDataThingsId(@Param("things_id") String things_id);

    Integer countRealFaultCodeDataToday(@Param("thingsId") String thingsId);


    Map<String, Object> lastCarData(@Param("tableName") String tableName, @Param("thingsId") String thingsId);

    Map<String, Object> lastCarDataIgnition(@Param("tableName") String tableName,
                                            @Param("thingsId") String thingsId,
                                            @Param("map") Map<String,Object> map);

    Map<String, Object> lastCarDataCANOK (@Param("tableName") String tableName,
                                          @Param("thingsId") String thingsId);

    String getFuelGaugeRadio (@Param("tableName") String tableName,
                              @Param("thingsId") String thingsId);



    Map<String, Object> firstCarDataIgnition(@Param("tableName") String tableName,
                                             @Param("thingsId") String thingsId,
                                             @Param("hasIgnition") Boolean hasIgnition);

    /**
     * 获取今日车辆数据
     * @param
     * @return
     */
    List<Map<String, Object>> getCarDataToday(Map<String, Object> reqMap);

    /**
     * 获取每日最新的两条数据
     * @return
     */
    List<Map<String, Object>> dailyLastTwoCarData(Map<String, Object> reqMap);

    /**
     * 获取今日第一条数据
     * @param tableName
     * @param thingsId
     * @return
     */
    Map<String, Object> firstCarDataToday(@Param("tableName") String tableName, @Param("thingsId") String thingsId);

    /**
     * 获取指定日期的最后一条数据
     * @param tableName
     * @param thingsId
     * @return
     */
    Map<String, Object> lastCarDataByDate(@Param("tableName") String tableName, @Param("thingsId") String thingsId, @Param("date") String date);

    /**
     * 获取车设备的经纬度历史数据
     * @param reqMap
     * @return
     */
    LinkedList<Map<String, Object>> listCarHistoryTrajectoryData(Map<String, Object> reqMap);

    /**
     * 获取车设备的指定列的数据
     * @param reqMap
     * @return
     */
    LinkedList<Map<String, Object>> listCarHistoryDataSpecifyField(Map<String, Object> reqMap);

    /**
     * 获取工时分布统计
     * @param
     * @return
     */
    LinkedList<Map<String, Object>> workingHoursDistributionStatistics(@Param("tableName") String tableName, @Param("thingsId") String thingsId, @Param("date") String date);

    /**
     * 获取油箱容量
     * @param reqMap
     * @return
     */
    Map<String, Object> getFuelTank(Map<String, Object> reqMap);

    /**
     * 更新油箱容量
     * @param reqMap
     * @return
     */
    int modifyFuelTank(Map<String, Object> reqMap);

    /**
     * 获取车设备的油耗和工时历史数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listCarHistoryWorkingTimesData(Map<String, Object> reqMap);

    /**
     * 获取历史数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listCarHistoryData(Map<String, Object> reqMap);

    /**
     * 获取历史数据总数
     * @param reqMap
     * @return
     */
    int countListCarHistoryData(Map<String, Object> reqMap);

    /**
     * 获取某个指标的历史数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getCarHistoryIndexData(Map<String, Object> reqMap);

    /**
     *
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> workingHourStatistics(Map<String, Object> reqMap);

    /**
     * 每天的最大最小峰值
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> peakDayData(Map<String, Object> reqMap);

    /**
     *
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> workingHourStatistics2(Map<String, Object> reqMap);

    /**
     * 获取车设备的油耗和工时历史数据
     * @param reqMap
     * @return
     */
    LinkedList<Map<String, Object>> carFuelConsumptionStatistics(Map<String, Object> reqMap);

    /**
     * 每小时最大最小峰值
     * @param reqMap
     * @return
     */
    LinkedList<Map<String, Object>> hourlyPeak(Map<String, Object> reqMap);

    /**
     * 每小时最新最旧值
     * @param reqMap
     * @return
     */
    LinkedList<Map<String, Object>> borderHourlyData(Map<String, Object> reqMap);

    /**
     * 获取只能对象模版参数
     * @param intelligentTemplateId
     * @return
     */
    LinkedList<Map<String, Object>> getIntelligentTemplateDetails(@Param("intelligentTemplateId") String intelligentTemplateId);

    /**
     * 获取车辆的所有维修工单
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listOrderByCarId(Map<String, Object> reqMap);

    /**
     * 根据智能模版id获取故障码对象
     * @param id
     * @return
     */
    Map<String, Object> getFaultCodeByIntelligentTemplateId(@Param("id") String id);


    /**
     * 根据故障模版id获取故障码列表
     * @param faultId
     * @return
     */
    List<Map<String, Object>> getFaultDetailsByFaultTemplateId(@Param("faultId") String faultId);

    /**
     * 获取故障历史数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getFaultHistoryData(Map<String, Object> reqMap);
    /**
     * 获取故障今日数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getFaultRealData(Map<String, Object> reqMap);

    /**
     * 删除今日数据中的历史故障代码
     * @param id
     * @return
     */
    int deleteTodayHistoryFaultCode(@Param("id") String id);

    Map<String, Object> getFaultCodeById(@Param("id") String id);

    /**
     *
     * @param spn
     * @param fmi
     * @param isFault 判断是否是故障，true是故障 false 是事件
     * @return
     */
    int deleteFaultCodeBySpnFmi(@Param("spn") String spn, @Param("fmi") String fmi, @Param("isFault") Boolean isFault);

    /**
     * 获取所有绑定了故障码的智能模版
     * @param
     * @return
     */
    List<Map<String, Object>> getAllBindFaultCodeIntelligentTemplate();

    /**
     * 获取指定日期的所有设备数据
     * @param
     * @return
     */
    List<Map<String, Object>> listYesterdayCarData(@Param("tableName") String tableName, @Param("date") String date);

    /**
     * 保存故障码数据
     * @param list
     * @return
     */
    int saveFaultCodeData(@Param("list") List<Map<String, Object>> list);

    String getFuelGauge(@Param("thingsId") String thingsId);

    double getFuelGaugeData(@Param("thingsId") String thingsId, @Param("table") String table);

    double getIdleTimeOneDay(@Param("thingsId") String thingsId, @Param("table") String table, @Param("date") String date);

    /**
     * 获取所有物联设备
     * @return
     */
    List<Map<String, Object>> getAllPcCar();

    /**
     * 保存数据
     * @return
     */
    int saveCarDataStatistics(@Param("list") List<Map<String, Object>> list);

    /**
     * 获取工作时长数据
     * @param thingsId
     * @param date
     * @return
     */
    String getWorkHoursByDate(@Param("thingsId") String thingsId, @Param("date") String date);


    List<String> getWorkHoursByStartTimeAndEndTime(@Param("thingsId") String thingsId, @Param("startTime") String startTime ,@Param("endTime") String endTime );

    /**
     * 获取车的实时数据
     * @param
     * @return
     */
    Map<String, Object> getCarRealData(Map<String,Object> map);

    /**
     * 获取车的实时数据
     * @param
     * @return
     */
    Map<String, Object> getLocationRealData(Map<String,Object> map);


    /**
     * 更新数据统计
     * @param map
     * @return
     */
    int updateDataStatistics(Map<String, Object> map);
    /**
     * 获取工时记录列表
     * @return
     */
    LinkedList<Map<String, Object>> listOperatingHours(Map<String, Object> reqMap);

    Map<String, Object> getFaultGrab(@Param("thingsId") String thingsId);

    int saveFaultGrab(@Param("thingsId") String thingsId);

    int saveCarAttachment(Map<String, Object> reqMap);

    Map<String, Object> getCarAttachment(Map<String, Object> reqMap);

    List<Map<String, Object>> carMembership(Map<String, Object> reqMap);

    List<String> getAllDate(@Param("tableName") String tableName, @Param("thingsId") String thingsId);

    /**
     * 保存工时等数据统计
     * @param map
     * @return
     */
    int insertDataStatistics(Map<String, Object> map);

    /**
     * 获取工作时长数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listWorkHours(Map<String, Object> reqMap);

    /**
     * 获取油耗数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listFuelConsumption(Map<String, Object> reqMap);

    /**
     * 获取一年所有的工时统计
     */
    List<Map<String, Object>> getDataStaticsByYear(@Param("thingsId") String thingsId,
                                                   @Param("yearDate") String yearDate);

    /**
     * 获取上下数据相差天数
     */
    List<Map<String, Object>> getThingsDiffDays(@Param("thingsId") String thingsId,
                                                @Param("yearDate") String yearDate,
                                                @Param("monthDate") String monthDate);

    /**
     * 获取今日工作时长
     * @param thingsId
     * @return
     */
    String getWorkHoursToday(String thingsId);

    Map<String, Object> getTodayWorkHours(@Param("thingsId") String thingsId,
                                          @Param("tableName") String tableName);

    /**
     * 获取表内所有设备的最新数据
     * @return
     */
    List<Map<String, Object>> getAllThingsLastCarData(@Param("tableName") String tableName);
    /**
     * 车辆工作小时达到保养套餐的工时
     * @return
     */
    List<Map<String, Object>> getWorkHoursReachMaintenance();

    List<Map<String, Object>> getFuelGaugeDataStatics(@Param("date") LocalDate date, @Param("threshold") Integer threshold);

    List<Map<String, Object>> getFaultDataStatics(@Param("date") LocalDate date);

    List<Map<String, Object>> getOwnerCarByThingss(@Param("thingss") String thingss);

    List<Map<String, Object>> getUserBySIdAndRId(@Param("sId") String sId, @Param("rId") String rId);

    List<Map<String, Object>> getFaultDetails(@Param("thingsId") String thingsId);

    Map<String, Object> getIntelligentTemplateDetail(@Param("tag") String tag,
                                                     @Param("intelligentTemplateId") String intelligentTemplateId);

    List<Map<String, Object>> getEveryDayFuelAmount(@Param("thingsId") String thingsId,
                                                    @Param("tableName") String tableName);

    ArrayList<Map<String, Object>> getAllOnlineThings();

    ArrayList<Map<String, Object>> getAllOnlineThingsNew();

    ArrayList<Map<String, Object>> getAllFaultThings();

    Map<String, Object> getCarRealTemplateData(String things_id);

    ArrayList<Map<String, Object>> getAllTodayOnlineThings();

    ArrayList<Map<String, Object>> getAllTodayDeviceOnlineThings();

    ArrayList<Map<String, Object>> getAllDeviceOnlineThings();

    ArrayList<Map<String, Object>>getTodayThings();

    ArrayList<Map<String, Object>> selectAllRealThingsId();

    ArrayList<Map<String, Object>> getAllCAT();

    Map<String, Object> fuelAmount(@Param("thingsId") String thingsId,
                                   @Param("tableName") String tableName,
                                   @Param("date") String date);

    int updateFuelAmount(@Param("thingsId") String thingsId,
                         @Param("fuel_consumption") String fuel_consumption,
                         @Param("date") String date);

    ArrayList<Map<String, Object>> selectFuelConsumption();

    ArrayList<Map<String, Object>> getLocationListLimit(Map<String, Object> map);

    int updateCarLocation(@Param("GPSlongitude") String GPSlongitude,
                          @Param("GPSlatitude") String GPSlatitude,
                          @Param("location") String location,
                          @Param("thingsId") String thingsId);

    int insertLocationRecord(Map<String, Object> map);

    /**
     * 更新车辆位置的数据
     * @return
     */
    int insertcarLocationData(Map<String, Object> map);

    List<String>selectTemplate();

    List<Map<String,Object>>selectCarLocation(@Param("tableName") String tableName);

    List<String>getThingsIdCarLocation(@Param("tableName") String tableName);

    // 获取最新的定位
    Map<String, Object> getnewLocationLimit(Map<String, Object> map);

    List<Map<String, Object>> selectInfoByThingsId(@Param("tableName") String tableName, @Param("thingsId") String thingsId,
                                                   @Param("startTime") Date startTime,@Param("endTime") Date endTime
            , @Param("columnName") String columnName);
    List<String> selectPcCarList(@Param("sId")String sId);

    List<String> selectPcCarColumnList(@Param("tableName")String tableName);

    Map<String, Object> selectDataByThingsId(@Param("thingsId")String thingsId);

    void insertDataReal(Map<String, Object> historyDataFast);

    void updateDataReal(Map<String, Object> historyDataFast);

    List<Map<String,Object>> selectByIds(@Param("thingsIds")String thingsIds);

    List<Map<String,Object>> selectByStatus();

    Map<String,Object> selectTemplateById(@Param("map1Key")String map1Key);

    List<String> selectComment(@Param("map1Key")String map1Key);

    Map<String,Object> selectWorkHourNew(@Param("item")String item,
                                         @Param("thingsId")String thingsId);

    List<Map<String, Object>>  selectKateWorkDetail(@Param("item")String item,
                                                    @Param("thingsId")String thingsId);

    List<Map<String, Object>>  selectKateWorkDetailForList(@Param("item")String item,
                                                    @Param("thingsId")String thingsId,
                                                    @Param("tableName")String tableName);

    Map<String,Object> selectUnit(@Param("key")String key);

    List<Map<String, Object>> selectAllThingsId();

    List<Double> seletDataByTem(@Param("thingsId") String thingsId, @Param("table") String table,
                                       @Param("item") Map<String, Object> item);

    void insertIntoNewData(@Param("substring")String substring, @Param("substring1")String substring1);

    List<Map<String,Object>> selectCarFaultCode(@Param("thingsId")String decryptResult,
                                                @Param("map") Map<String, Object> map);

    List<String> selectTer();

    List<Map<String,Object>> selectLocation();

    int selectCountLocation(@Param("thingsId")String thingsId);

    double getFuelConsumption(@Param("thingsId")String thingsId, @Param("table") String table);

    List<Integer> getFuelGaugeWeek(@Param("thingsId")String thingsId);

    Map<String, Object>  selectFuelTank(@Param("thingsId")String thingsId);

    Double selectEveryDayFuel(@Param("thingsId")String thingsId);

    List<Map<String,Object>> selectMoreDataListWeek(@Param("keyList")String keyList,
                                                    @Param("thingsId")String thingsId,
                                                    @Param("tb1")String tb1,
                                                    @Param("tb2") String tb2,
                                                    @Param("startTime") Date startTime,
                                                    @Param("endTime") Date endTime,
                                                    @Param("tb3")String tb3,
                                                    @Param("tb4") String tb4);

    List<Map<String,Object>> selectMoreDataList(@Param("keyList")String keyList,
                                                @Param("thingsId")String thingsId,
                                                @Param("tb1")String tb1,
                                                @Param("tb2") String tb2,
                                                @Param("startTime") Date startTime,
                                                @Param("endTime") Date endTime);

    List<String> selectMoreDataListWeekData(@Param("thingsId")String thingsId,
                                            @Param("tb1")String tb1,
                                            @Param("tb2") String tb2,
                                            @Param("startTime") Date startTime,
                                            @Param("endTime") Date endTime,
                                            @Param("tb3")String tb3,
                                            @Param("tb4") String tb4,
                                            @Param("sortMethod") String sortMethod);

    Map<String,Object> selectInfoDataWeek(@Param("dataId")String item,
                                           @Param("keyList")String keyList,
                                           @Param("tb1")String tb1,
                                           @Param("tb2") String tb2);

    long selectMoreDataListWeekDataCount(@Param("thingsId")String thingsId,
                                         @Param("tb1")String tb1,
                                         @Param("tb2") String tb2,
                                         @Param("startTime") Date startTime,
                                         @Param("endTime") Date endTime,
                                         @Param("tb3")String tb3,
                                         @Param("tb4") String tb4);

    void updateStatis(@Param("id")String id, @Param("engineTotalHours")double engineTotalHours);

    List<String> selectAllOnline();

    List<Map<String, Object>> selectDataByOneHour(@Param("tableName")String tableName);

    List<Map<String, Object>> selectOwner(@Param("ids")String ids,@Param("type")Integer type);

    Map<String, Object> listCarDateInfoNew(@Param("id")String id);

    int selectIsServer(@Param("sid")String s_id);

    List<String> selectSidByServer(@Param("id")String id);

    List<Map<String,Object>> listCarNewByServer(Map<String, Object> reqMap);

    Map<String,Object> selectKtblNow(@Param("tableName")String s, @Param("thingsId")String thingsId);

    Map<String,Object> selectKtblDayNow(@Param("tableName")String s, @Param("thingsId")String thingsId);

    long selectIsExist(@Param("tableNameLast")String tableNameLast);

    List<Map<String,Object>> selectBySidModelIdKt(@Param("thingsId")String thingsId);

    List<Map<String,Object>> selectBySidModelIdwxzt(@Param("thingsId")String thingsId);

    Map<String,Object> selectCarFaultCodeInfo(@Param("faultId")String faultId);

    Map<String, Object> readStatus();

    List<Map<String,Object>> selectBySidModelIdKtSpe(@Param("thingsId")String thingsId);

    long selectExcavator(@Param("thingsId")String thingsId);

    List<Map<String, Object>> selectCarFaultCodeInfoFirst(@Param("mapList")Map<String, Object> mapList);

    List<Map<String, Object>> selectCarFaultCodeFirstNow(@Param("mapList")Map<String, Object> mapList);

    Boolean addOiLevelPictureUrl(Map<String, Object> map);

    List<Map<String, Object>> getOilLevelList(Map<String, Object> reqMap);

    void updateOilLevelUrl(Map<String, Object> reqMap);

    String getLargeEngineTotalHour(String thingsId, String tableName2);

    List<Map<String, Object>> listCarPage(Map<String, Object> reqMap);

    List<Map<String, Object>> listOwnerCarNewPage(Map<String, Object> reqMap);

    Map<String,Object> selectWaterTemper(@Param("thingsId")String thingsId);

    Map<String, Object> selectOilTemper(@Param("thingsId")String thingsId);

    Map<String, Object> selectOilPressure(@Param("thingsId")String thingsId);

    Map<String, Object> selectHdlOilHighTemperature(@Param("thingsId")String thingsId);

    Map<String, Object> selectHdlOilLowTemperature(@Param("thingsId")String thingsId);

    int selectIdleTimeHigh(@Param("thingsId")String thingsId);

    void insertWaterTemper(@Param("thingsId")String thingsId);

    void insertOilTemper(@Param("thingsId")String thingsId);

    void insertOilPressure(@Param("thingsId")String thingsId);

    void insertHdlOilHighTemperature(@Param("thingsId")String thingsId);

    void insertHdlOilLowTemperature(@Param("thingsId")String thingsId);

    void insertIdleTimeHigh(@Param("thingsId")String thingsId, @Param("rotateSpeed")Double rotateSpeed);

    Integer selectPushCount(@Param("userId")String userId,
                            @Param("thingsId")String thingsId,
                            @Param("type")Integer type);
    List <String> selectNowDayCountMessages(@Param("createTime")String createTime,
                         @Param("thingsId")String thingsId,
                         @Param("sendType")Integer sendType);
    int selectPushCountWithinTwentyMinutes(@Param("userId")String userId,
                                           @Param("thingsId")String thingsId,
                                           @Param("type")Integer type);

    Integer selectPushCountInSevenDays(@Param("userId")String userId,
                            @Param("thingsId")String thingsId,
                            @Param("type")Integer type);

    Integer selectPushCountInTenMinutes(@Param("userId")String userId,
                                       @Param("type")Integer type,
                                        @Param("context")String context);

    List<Map<String, Object>> selectPushFive(@Param("thingsId")String thingsId,
                                             @Param("type")Integer type);

    Integer selectIsPush(@Param("thingsId")String thingsId,
                         @Param("type")Integer type);

    void updateWaterCount(@Param("thingsId")String thingsId,
                          @Param("count")Integer count);

    void updateOilCount(@Param("thingsId")String thingsId,
                          @Param("count")Integer count);

    void updateOilPressureCount(@Param("thingsId")String thingsId,
                        @Param("count")Integer count);

    void updateHighHdlOilPressureCount(@Param("thingsId")String thingsId,
                                @Param("count")Integer count);

    void updateLowHdlOilPressureCount(@Param("thingsId")String thingsId,
                                       @Param("count")Integer count);

    void insertOnlineEveryDay(@Param("thingsId")String thingsId);

    Map<String,Object> selectOnlineEveryDay(@Param("thingsId")String thingsId);

    String  selectDp(@Param("item")String item);

    List<Map<String, Object>> selectfast(@Param("table")String table, @Param("params")Map<String, Object> params
                        , @Param("thingsId")String item);

    void insertTableValue(@Param("table")String table,
                          @Param("historyDataFast")Map<String, Object> item1);

    List<Map<String, Object>> selectTableValue(@Param("table")String table,
                          @Param("historyDataFast")Map<String, Object> item1);

    List<Map<String, Object>> selectZoweProject();

    void insertZowePro(@Param("item")Map<String, Object> item);

    List<Map<String, Object>> selectLocationByList(@Param("tableName")String tableName,
                                                   @Param("item")List<String> startTime,
                                                   @Param("thingsId")String thingsId);
    List<Map<String, Object>> selectLocationByListByStartTimeAndEndTime(@Param("tableName")String tableName,
                                                   @Param("startTime")String startTime,
                                                   @Param("endTime")String endTime,
                                                   @Param("thingsId")String thingsId);

    List <String> selectEnvIsExist(@Param("envSId")String envSId);

    Map<String, Object> selectKtblTB2(@Param("tableName")String s, @Param("thingsId")String thingsId);

    String getOwnerName(Map<String, Object> str);

    Map<String, Object> getTotalWorkHour(String things_id);

    List<String> getsidList(String sid);

    List<Map<String, Object>> getsidDetailList(String sid);

    List<Map<String, Object>> faultCodeList(@Param("reqMap")Map<String, Object> reqMap,@Param("sids")List<String> sids);

    List<Map<String, Object>> carFaultCodeList(@Param("reqMap")Map<String, Object> reqMap,@Param("sids")List<String> sids);

    List<Map<String, Object>> carFaultDetailList(@Param("reqMap")Map<String, Object> reqMap);

    List<FaultCodeBean> exportFaultCodeList(@Param("reqMap")Map<String, Object> reqMap,@Param("sids")List<String> sids);

    /**
     * 根据things_id获取对应的车辆的胎压信息
     * @param paraMap
     * @return
     */
    List<Map<String, Object>> carTirepressureData(Map<String, Object> paraMap);

    /**
     * 车辆工作小时达到保养套餐的工时 - 针对于钻通
     * @return
     */
    List<Map<String, Object>> getWorkHoursReachMaintenanceForZT();

    List<Map<String, Object>> selectSidByCarModelId(@Param("carModelIds") List<String> carModelIds);
    List<String> selectBrandAndModel(@Param("carModelIds") List<String> carModelIds);
    List<Map<String, Object>> selectSidByCarTypeId(@Param("carTypeId") String carTypeId);

    Set<Map<String, Object>> selectUseridsBySids(@Param("sids") Set<String> sids);

    String selectModelNameByCarModelId(@Param("carModelIds") List<String> carModelIds);

    String selectModelNameByCarTypeId(@Param("carTypeId") String carTypeId);

    void insertOilLowByType(Map<String, Object> paraMap);


    /**
     * 根据things_id获取车辆的信息（car_model_id以及s_id）
     * @param things_id
     * @return
     */
    Map<String, Object> selectCarInfoByThingsId(String things_id);

    /**
     *获取所有已经绑定车主的设备(things_id)
     */
    List<Map<String,Object>> selectAllBindedCar();

    int selectEquipDataList(@Param("things_id") String things_id);

    /**
     *获取所有设备(things_id)
     */
    List<Map<String, Object>> getEquipmentList(@Param("car_id") String car_id);

    /**
     *获取无线设备数据(things_id)
     */
    Map<String, Object> selectWirelessDeviceData(Map<String, Object> paraMap);

    String exportRenewalMessage(String id);

    /**
     * 添加或更新pc_car_real_template_data_electric表的数据
     * @param paraMap
     * @return
     */
    int insertOrUpdatePCDataElectric(Map<String, Object> paraMap);

    /**
     * 查询电车(透传)的数据列和中英文字段
     * @return
     */
    List<Map<String, Object>> selectTextDataForElectric();

    /**
     * 查询电车(透传)的数据列和中英文字段对应的数据值
     * @param keyList
     * @param thingsId
     * @return
     */
    LinkedHashMap<String, Object> selectDataListForElectric(@Param("keyList") String keyList, @Param("thingsId") String thingsId);

    /**
     * 查询单位
     * @param key
     * @return
     */
    Map<String, Object> selectUnitForElectric(@Param("key") String key);

    /**
     * 添加或更新pc_car_real_template_data_electric_b2v表的数据
     * @param paraMap
     * @return
     */
    int insertOrUpdatePCDataElectricB2V(Map<String, Object> paraMap);

    /**
     * 查询电车(透传)的数据列和中英文字段
     * @return
     */
    List<Map<String, Object>> selectDataForElectricB2V(@Param("thinds_id") String thinds_id);
}